Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 91   Methods: 4
NCLOC: 48   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
EJBLocalWriter.java 0% 0% 0% 0%
coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 package org.apache.geronimo.ews.ws4j2ee.toWs.ejb;
 17   
 
 18   
 import org.apache.geronimo.ews.ws4j2ee.context.J2EEWebServiceContext;
 19   
 import org.apache.geronimo.ews.ws4j2ee.context.SEIOperation;
 20   
 import org.apache.geronimo.ews.ws4j2ee.context.j2eeDD.EJBContext;
 21   
 import org.apache.geronimo.ews.ws4j2ee.toWs.GenerationFault;
 22   
 import org.apache.geronimo.ews.ws4j2ee.toWs.JavaInterfaceWriter;
 23   
 
 24   
 import java.util.ArrayList;
 25   
 import java.util.Iterator;
 26   
 
 27   
 /**
 28   
  * This class can be used to write the appropriate EJB Remote interface
 29   
  * class for the given port type.
 30   
  *
 31   
  * @author Rajith Priyanga
 32   
  * @author Srinath Perera
 33   
  * @date Nov 26, 2003
 34   
  */
 35   
 public class EJBLocalWriter extends JavaInterfaceWriter {
 36   
     private String name;
 37   
     protected EJBContext ejbcontext;
 38   
 
 39   
     /**
 40   
      * Constructs a EJBRemoteWriter.
 41   
      *
 42   
      * @param portType The port type which contains the details.
 43   
      * @throws GenerationFault
 44   
      */
 45  0
     public EJBLocalWriter(J2EEWebServiceContext context, EJBContext ejbcontext) throws GenerationFault {
 46  0
         super(context, ejbcontext.getEjbLocalInterface());
 47  0
         this.ejbcontext = ejbcontext;
 48   
     }
 49   
 
 50  0
     protected String getExtendsPart() {
 51  0
         return " extends javax.ejb.EJBLocalObject";
 52   
     }
 53   
 
 54  0
     protected void writeAttributes() throws GenerationFault {
 55   
     }
 56   
 
 57  0
     protected void writeMethods() throws GenerationFault {
 58  0
         String parmlistStr = "";
 59  0
         ArrayList operations = j2eewscontext.getMiscInfo().getSEIOperations();
 60  0
         for (int i = 0; i < operations.size(); i++) {
 61  0
             SEIOperation op = (SEIOperation) operations.get(i);
 62  0
             String returnType = op.getReturnType();
 63  0
             if (returnType == null)
 64  0
                 returnType = "void";
 65  0
             out.write("\tpublic " + returnType + " " + op.getMethodName() + "(");
 66  0
             Iterator pas = op.getParameterNames().iterator();
 67  0
             boolean first = true;
 68  0
             while (pas.hasNext()) {
 69  0
                 String name = (String) pas.next();
 70  0
                 String type = (String) op.getParameterType(name);
 71  0
                 if (first) {
 72  0
                     first = false;
 73  0
                     out.write(type + " " + name);
 74  0
                     parmlistStr = parmlistStr + name;
 75   
                 } else {
 76  0
                     out.write("," + type + " " + name);
 77  0
                     parmlistStr = "," + name;
 78   
                 }
 79   
             }
 80  0
             out.write(")");
 81   
 //ejb giving problems deploying check this            
 82   
 //              ArrayList faults = op.getFaults();
 83   
 //              for (int j = 0; j < faults.size(); j++) {
 84   
 //                  out.write("," + (String) faults.get(i));
 85   
 //              }
 86  0
             out.write(";\n");
 87   
         }
 88   
     }
 89   
 
 90   
 }
 91